//
//  BHViewController.m
//  Behinders
//
//  Created by sigure on 14-10-23.
//  Copyright (c) 2014年 sigure. All rights reserved.
//

#import "BHViewController.h"
#import "ProfileViewController.h"
#import "DiscoverViewController.h"
#import "BHViewController.h"
#import "BHViewController.h"



@interface BHViewController ()

@end

@implementation BHViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    DiscoverViewController *Discover = [[DiscoverViewController alloc]init];
    [self addChildViewControllerVC:Discover title:@"发现" title2:@"" image:@""];

    UIViewController *Works = [[UIViewController alloc]init];
    [self addChildViewControllerVC:Works title:@"作品"  title2:@"曲库"image:@""];
    
    UIViewController *Behinders = [[UIViewController alloc]init];
    [self addChildViewControllerVC:Behinders title:@"幕后人" title2:@"幕后人" image:@""];
    
    ProfileViewController *Profile = [[ProfileViewController alloc]init];
    [self addChildViewControllerVC:Profile title:@"我的" title2:@"我的" image:@""];
    
    
    // Do any additional setup after loading the view.
}

- (void) addChildViewControllerVC:(UIViewController *)childController title:(NSString*)title title2:(NSString*)title2 image:(NSString*)imageName
{
    childController.title=title;
    childController.navigationItem.title=title2;
    childController.tabBarItem.image=[UIImage imageNamed:imageName];
    [self addChildViewController:childController];
    UINavigationController *nav =[[UINavigationController alloc]initWithRootViewController:childController];
    [self addChildViewController:nav];
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
